package com.ssy.lingxi.enhance.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 外部工作流记录 - DO
 * @author fhj
 * @date 2020/10/15
 * @version 2.0.0
 */
@Data
@Entity
@Table(schema = "public", name = "enhance_outer_workflow_record", indexes = {
        @Index(name = "enhance_outer_workflow_record_produce_notice_order_id_idx", columnList = "produceNoticeOrderId"),
        @Index(name = "enhance_outer_workflow_record_user_id_idx", columnList = "userId"),
        @Index(name = "enhance_outer_workflow_record_member_id_idx", columnList = "memberId"),
        @Index(name = "enhance_outer_workflow_record_role_id_idx", columnList = "roleId")
})
public class OuterWorkflowRecordDO implements Serializable {
    private static final long serialVersionUID = 4342566526082034396L;

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "outer_workflow_record_seq")
    @SequenceGenerator(sequenceName = "enhance_outer_workflow_record_seq", name = "outer_workflow_record_seq", allocationSize = 1)
    @ApiModelProperty(value = "ID")
    private Long id;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "生产通知单ID")
    private Long produceNoticeOrderId;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "会员ID")
    private Long memberId;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "角色ID")
    private Long roleId;

    @Column(columnDefinition = "int4")
    @ApiModelProperty(value = "操作步骤")
    private Integer step;

    @Column(columnDefinition = "varchar(100)")
    @ApiModelProperty(value = "操作角色")
    private String roleName;

    @Column(columnDefinition = "varchar(50)")
    @ApiModelProperty(value = "状态")
    private String status;

    @Column(columnDefinition = "varchar(50)")
    @ApiModelProperty(value = "操作")
    private String operate;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "操作时间")
    private Long operateTime;

    @Column(columnDefinition = "varchar(120)")
    @ApiModelProperty(value = "审核意见")
    private String opinion;
}
